-
Couldn't load subscription status.
- Fork 452
Feature: Extend for mixins #2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for the PR! This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direction looks good with some changes
inputfiles/patches/childnode.kdl
Outdated
| @@ -0,0 +1 @@ | |||
| interface-mixin ChildNode extends="Node" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(skip quote)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I don't think it's worth having a separate file for a single line change, but then I'm not sure what would be the right name. Maybe misc.kdl is fine and we can put random simple changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think extensions is a good name, because there are a bunch of things that we extend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please cover ParentNode too, and some comment like:
// ChildNode and ParentNode are actually defined as mixins, but because of their names they have historically been used as a sub-interface of Node.
... with some line wrapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think extensions is a good name, because there are a bunch of things that we extend
Actually I change my mind here, covering ChildNode/ParentNode with some context is worth a separate file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now child-parent-node.kdl or such? With that LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @saschanaz
src/build/patches.ts
Outdated
| const result: any = { | ||
| name, | ||
| events: { event }, | ||
| properties: { property }, | ||
| } as DeepPartial<Interface>; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const result: any = { | |
| name, | |
| events: { event }, | |
| properties: { property }, | |
| } as DeepPartial<Interface>; | |
| }; | |
| const result = { | |
| name, | |
| events: { event }, | |
| properties: { property }, | |
| } as DeepPartial<Interface>; |
It's not clear to me why const result: DeepPartial<Interface> doesn't work (the error is confusingly complex), but this should be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…fining return type and casting 'extends' property
|
LGTM |
|
There was an issue merging, maybe try again saschanaz. Details |
|
LGTM |
|
Merging because @saschanaz is a code-owner of all the changes - thanks! |
related #2053